import request from '@/utils/request'

// 查询设备类型列表
export function listModality(query) {
  return request({
    url: '/system/modality/list',
    method: 'get',
    params: query
  })
}

// 查询设备类型详细
export function getModality(modalityId) {
  return request({
    url: '/system/modality/' + modalityId,
    method: 'get'
  })
}

// 新增设备类型
export function addModality(data) {
  return request({
    url: '/system/modality',
    method: 'post',
    data: data
  })
}

// 修改设备类型
export function updateModality(data) {
  return request({
    url: '/system/modality',
    method: 'put',
    data: data
  })
}

// 删除设备类型
export function delModality(modalityId) {
  return request({
    url: '/system/modality/' + modalityId,
    method: 'delete'
  })
}

// 绑定设备
export function bindDevice(params) {
  return request({
    url: '/system/modalityMonitor/batchAdd' + modalityId,
    method: 'delete'
  })
}
